import React from 'react';
import  { Component } from 'react';
import "./index.css";

class Bar extends Component {
    constructor(props){
        let width=70;
        if(props.width!==undefined){
            width=props.width;
        }
        super();
        this.state={
            color:props.color,
            width
        }
    }
 render(){
     return(
        <span className="Bar" style={{background:this.state.color,width:this.state.width}}></span>
     )
 }
}
export default Bar;